package com.adingxiong.quickstart.project.entity.vo;

import com.adingxiong.quickstart.project.entity.WebMenu;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.List;

/**
 * @ClassName WebMenuVo
 * @Description TODO
 * @Author xiongchao
 * @Date 2020/5/21 17:45
 **/
@Data
public class WebMenuVo implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("`order`")
    @ApiModelProperty(value = "排序")
    private Integer order;

    @ApiModelProperty(value = "目录名称")
    private String catalogue;
    @TableField(value = "`key`")
    @ApiModelProperty(value = "菜单key值")
    private String key;

    @ApiModelProperty(value = "路由路径")
    private String url;

    @ApiModelProperty(value = "图标")
    private String icon;

    @ApiModelProperty(value = "打开方式 _blanl _self _top _parent")
    private String target;

    @ApiModelProperty(value = "状态 1 启用 2 禁用")
    private Integer state;

    @ApiModelProperty(value = "权限所属 0.超级管理员 1.管理员 2.普通用户")
    private String owners;

    @ApiModelProperty(value = "父节点id")
    private String parentId;

    @ApiModelProperty(value = "二级标题")
    List<WebMenu> childList ;

    public WebMenuVo (WebMenu webMenu){
        BeanUtils.copyProperties(webMenu,this);
    }
}
